package com.itheima.service.impl.activemq.listener;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.SendTo;

/**
 * ClassName: MessageListener
 * Description:
 * Date: 2023/03/16 PM 11:14:32
 * <p>
 * project: springboot
 * package: com.itheima.service.impl.activemq.listener
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
// @Component
public class MessageListener {

    @JmsListener(destination = "order.queue.id")
    @SendTo("order.other.queue.id")
    public String receive(String id) {
        System.out.println("已完短信发送业务，id: " + id);
        return "new:" + id;
    }
}
